/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.p10.miage.gestionnote.listener;

import fr.p10.miage.gestionabsence.model.Connection;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @comment Pas utilisé dans l'application
 * @author charleshenzel
 */
public class BddListener implements ServletContextListener
{

    @Override
    public void contextInitialized(ServletContextEvent event) 
    {
        ServletContext sc = event.getServletContext();

    	Connection db = new Connection();
    	System.out.println("in the listener!!");
    	sc.setAttribute("db", db);
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    
}
